package cate.common.table.activity.bosstrain.sheet;

import cate.common.table.ESheet;
import cate.common.table.activity.bosstrain.row.BossTaskRow;

import java.util.List;
import java.util.stream.Collectors;

public class BossTaskSheet extends ESheet<BossTaskRow> {
    @Override
    public String getSheetName() {
        return "任务奖励";
    }

    public List<Integer> getTaskIds(int configTid) {
        return getList().stream().filter(row -> row.configId == configTid).map(row -> row.taskId).collect(Collectors.toList());
    }

    public List<Integer> getTaskIds(int configTid, byte type) {
        return getList().stream().filter(row -> row.configId == configTid && row.type == type).map(row -> row.taskId).collect(Collectors.toList());
    }
}
